package com.bytz.modules.cms.statistic.model;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.google.common.collect.Range;
import lombok.Getter;
import lombok.Setter;

import java.math.BigDecimal;
import java.time.LocalDate;

@Getter
@Setter
public class DateRangeModel {
    @JsonIgnore
    private Range<LocalDate> range;

    private Integer count = 0;

    private BigDecimal sum;

    public LocalDate getStart() {
        return range.lowerEndpoint();
    }

    public LocalDate getEnd() {
        return range.upperEndpoint();
    }
}
